import React from 'react';

import {
    Actions
} from 'react-native-router-flux';

import {
    LocationData
} from './../../types/types'

export default (
    showAll:boolean=true,
    showHot:boolean=true
):Promise<LocationData> => new Promise(resolve => {
    Actions.push(`/location`,{
        showAll:showAll,
        showHot:showHot,
        onChange:resolve
    })
})